﻿
'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic



Public Class dc_DgMaster
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_dgmLastEdit = strUserId
    End Sub


#End Region

#Region " Enumerations "



#End Region

#Region " Properties and Fields "



    Public Const CUSTOM_DG_STENCIL = "DcRackBase.vss"

    Private Const constDgmTable As String = "na"
    Private Const constDgmSurrogateMaster As String = "na"
    Private Const constDgmSurrogateStencil As String = CUSTOM_DG_STENCIL
    Private Const constDgmSurrogatePrefix As String = "dghUnk"
    Private Const constDgmMaster As String = "na"
    Private Const constDgmStencil As String = CUSTOM_DG_STENCIL
    Private Const constDgmFontValue As Int16 = 8
    Private Const constDgmFontLabel As Int16 = 8
    Private Const constDgmCalloutWidth As Double = 10.0
    Private Const constDgmComments As String = "na"
    Private Const constDgmLastUpdate As Date = #1/1/2001#
    Private Const constDgmLastEdit As String = "na"

    Private m_dgmTable As String
    Public Property dgmTable() As String
        Get
            Return Me.m_dgmTable
        End Get
        Set(ByVal value As String)
            Me.m_dgmTable = value
            Me.OnPropertyChanged("dgmTable")
        End Set
    End Property

    Private m_dgmSurrogateMaster As String
    Public Property dgmSurrogateMaster() As String
        Get
            Return Me.m_dgmSurrogateMaster
        End Get
        Set(ByVal value As String)
            Me.m_dgmSurrogateMaster = value
            Me.OnPropertyChanged("dgmSurrogateMaster")
        End Set
    End Property

    Private m_dgmSurrogateStencil As String
    Public Property dgmSurrogateStencil() As String
        Get
            Return Me.m_dgmSurrogateStencil
        End Get
        Set(ByVal value As String)
            Me.m_dgmSurrogateStencil = value
            Me.OnPropertyChanged("dgmSurrogateStencil")
        End Set
    End Property

    Private m_dgmSurrogatePrefix As String
    Public Property dgmSurrogatePrefix() As String
        Get
            Return Me.m_dgmSurrogatePrefix
        End Get
        Set(ByVal value As String)
            Me.m_dgmSurrogatePrefix = value
            Me.OnPropertyChanged("dgmSurrogatePrefix")
        End Set
    End Property

    Private m_dgmMaster As String
    Public Property dgmMaster() As String
        Get
            Return Me.m_dgmMaster
        End Get
        Set(ByVal value As String)
            Me.m_dgmMaster = value
            Me.OnPropertyChanged("dgmMaster")
        End Set
    End Property

    Private m_dgmStencil As String
    Public Property dgmStencil() As String
        Get
            Return Me.m_dgmStencil
        End Get
        Set(ByVal value As String)
            Me.m_dgmStencil = value
            Me.OnPropertyChanged("dgmStencil")
        End Set
    End Property

    Private m_dgmFontValue As Int16
    Public Property dgmFontValue() As Int16
        Get
            Return Me.m_dgmFontValue
        End Get
        Set(ByVal value As Int16)
            Me.m_dgmFontValue = value
            Me.OnPropertyChanged("dgmFontValue")
        End Set
    End Property

    Private m_dgmFontLabel As Int16
    Public Property dgmFontLabel() As Int16
        Get
            Return Me.m_dgmFontLabel
        End Get
        Set(ByVal value As Int16)
            Me.m_dgmFontLabel = value
            Me.OnPropertyChanged("dgmFontLabel")
        End Set
    End Property

    Private m_dgmCalloutWidth As Double
    Public Property dgmCalloutWidth() As Double
        Get
            Return Me.m_dgmCalloutWidth
        End Get
        Set(ByVal value As Double)
            Me.m_dgmCalloutWidth = value
            Me.OnPropertyChanged("dgmCalloutWidth")
        End Set
    End Property

    Private m_dgmComments As String
    Public Property dgmComments() As String
        Get
            Return Me.m_dgmComments
        End Get
        Set(ByVal value As String)
            Me.m_dgmComments = value
            Me.OnPropertyChanged("dgmComments")
        End Set
    End Property

    Private m_dgmLastUpdate As Date
    Public Property dgmLastUpdate() As Date
        Get
            Return Me.m_dgmLastUpdate
        End Get
        Set(ByVal value As Date)
            Me.m_dgmLastUpdate = value
            Me.OnPropertyChanged("dgmLastUpdate")
        End Set
    End Property

    Private m_dgmLastEdit As String
    Public Property dgmLastEdit() As String
        Get
            Return Me.m_dgmLastEdit
        End Get
        Set(ByVal value As String)
            Me.m_dgmLastEdit = value
            Me.OnPropertyChanged("dgmLastEdit")
        End Set
    End Property

#End Region

#Region " Methods "


    Public Sub initProperties()

        Try

            dgmTable = constDgmTable
            dgmSurrogateMaster = constDgmSurrogateMaster
            dgmSurrogateStencil = constDgmSurrogateStencil
            dgmSurrogatePrefix = constDgmSurrogatePrefix
            dgmMaster = constDgmMaster
            dgmStencil = constDgmStencil
            dgmFontValue = constDgmFontValue
            dgmFontLabel = constDgmFontLabel
            dgmCalloutWidth = constDgmCalloutWidth
            dgmComments = constDgmComments
            dgmLastUpdate = Now
            dgmLastEdit = constDgmLastEdit


        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub



#End Region


End Class